package com.le.tester.javaThink.fifth.chapter13_FuncProgramming;

import java.util.function.Function;

/**
 * createTime：2021/8/6 16:38
 * description：柯里化三个参数
 */
public class Curry3Args {
    public static void main(String[] args) {
        //一个一个的进行拆分
        Function<String, Function<String, Function<String, String>>> sum = a -> b -> c -> a + b + c;

        Function<String, Function<String, String>> hi = sum.apply("Hi ");

        Function<String, String> ho = hi.apply("Ho ");

        System.out.println(ho.apply("Hup "));
    }
}
